<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // 数组也是对象
        // 创建一个新数组，数组名为：arr
        var arr = new Array ();
        // 修改数组长度
        arr.length = 3;
        // 向数组中添加值
        arr[0] = 0;
        arr[1] = 1;
        arr[2] = 2;
        for (var i = 0; i < arr.length; i++){
            document.write(arr[i]);
        }
    </script>
</head>
<body>
    
</body>
</html>